@extends('layouts.admin')

@section('title', '死宅博客' )



@section('content')

      <!--sidebar end-->
      
      <!-- **********************************************************************************************************************************************************
      MAIN CONTENT
      *********************************************************************************************************************************************************** -->
   <section id="main-content">
          <section class="wrapper">
            <h3><i class="fa fa-angle-right"></i>角色管理</h3>
            <!-- BASIC FORM ELELEMNTS -->
            <div class="row mt">
                <div class="col-lg-12">
                  <div class="form-panel">
                        <h4 class="mb"><i class="fa fa-angle-right"></i>添加角色</h4>
                        <form class="form-horizontal style-form" method="post" action="{{route('admin.user.store')}}">
                            {{ csrf_field() }}
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">分配人员名字</label>
                                <div class="col-sm-10">
                                    <input type="text"  class="form-control" id="name" name="name"  placeholder="唯一标识如admin" value="{{old('name')}}" >
                                    <lable class="error error_name"   style="display: inline-block;">{{$errors->first('name')}}</lable>
                                </div>
                                
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">帐号</label>
                                <div class="col-sm-10">
                                    <input type="text"  class="form-control" id="email" name="email" placeholder="邮箱" value="{{old('email')}}">
                                    <lable class="error error_email"   style="display: inline-block;">{{$errors->first('email')}}</lable>
                                </div>
                                
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">密码</label>
                                <div class="col-sm-10">
                                    <input type="password"  class="form-control"  placeholder="请输入密码" value="{{old('description')}}"  id="password" name="password" >
                                    <lable class="error error_password"   style="display: inline-block;">{{$errors->first('password')}}</lable>
                                </div>
                               
                                
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">确认密码</label>
                                <div class="col-sm-10">
                                    <input type="password"  class="form-control"  placeholder="再次输入密码" value="{{old('confirm_password')}}"  id="password_confirmed" name="password_confirmed" type="password">
                                    <lable class="error error_password_confirmed"   style="display: inline-block;">{{$errors->first('confirm_password')}}</lable>
                                </div> 
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">分配角色</label>
                                <div class="col-sm-10">
                                    <div>
                                        @foreach($role as $v)
                                        @if($v->id!=1)
                                        <label class="checkbox-inline">
                                            <input type="radio" id="inlineCheckbox1" name="role" value="{{$v->id}}">{{$v->display_name}}
                                        </label>
                                        @endif
                                        @endforeach
                                    </div>
                                    <lable class="error error_role"   style="display: inline-block;">{{$errors->first('description')}}</lable>
                                </div> 
                            </div>
                            
                            <button type="submit" class="btn btn-theme02"><i class="fa fa-check"></i> 提交</button>
                        </form>
                  </div>
                </div><!-- col-lg-12-->         
            </div><!-- /row -->
       
  
            
            
        </section>
      </section><!-- /MAIN CONTENT -->
  
@endsection

 @section('script')
    <script src="{{asset('assets/assets/js/jquery.validate.js')}}"></script>
    <script src="{{asset('assets/js/quanxian.js')}}"></script>
   
@endsection